#pragma once

#include "GUIBase.h"

#include "Singleton.h"

#include <queue>

struct GUIMessage
{	
	std::string m_guiID;
	UINT m_message;
};

class GUIManager : public Singleton<GUIManager>
{
public:
	GUIManager();
	~GUIManager();

	void Init();
	void UnInit();

	BOOL LoadGUIList( std::string xmlFileName );

public:
	void Update( float fTimeDelta );
	void Render();

	void HandleEvent( UINT message, WPARAM wParam, LPARAM lParam );

public:
	GUIBase * GetGUIByID( const std::string id );
	BOOL PopGUIMessage( GUIMessage & msg );

private:
	std::vector<GUIBase*> m_guiList;
	std::queue<GUIMessage> m_guiMessageDeque;
};